<?php
/*
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     function.hidden.php
 * Type:     function
 * Name:     hidden
 * Purpose:  outputs html for a hidden form input
 * -------------------------------------------------------------
 */
function smarty_function_hidden($params, &$smarty) {
    $object = $smarty->_tpl_vars[$params['object']];
	$mapping = $params['object'] . '.' . $params['name'];
    
	$html .= '<input type="hidden" name="' . $mapping . '" id="' . $mapping . '" value="' . $object->$params['name'] . '" />';
    return $html;
}
?>